package edu.gmu.project.examples;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class DateServer {
	public static void main(String[] args) throws IOException {
		ServerSocket listener = new ServerSocket(9090);

		try {
			while (true) {
				Socket socket = listener.accept();
				try {
					BufferedInputStream bos = new BufferedInputStream(socket.getInputStream());
//					bos.
//					PrintWriter out = new PrintWriter(socket.getOutputStream(),
//							true);
//					out.println(new Date().toString());
				} finally {
					socket.close();
				}
			}
		} finally {
			listener.close();
		}
	}
}
